
cmake_minimum_required(VERSION 3.24)

project(gb32960 VERSION 0.1.0  LANGUAGES C CXX)

set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)

# Set cmake path
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

include(CMakeDependentOption)

# Some option
option(AIMRT_BUILD_TESTS "GB32960 build tests." ON)
option(AIMRT_BUILD_WITH_PROTOBUF "GB32960 build with protobuf." ON)
option(AIMRT_BUILD_PROTOCOLS "GB32960 build protocols." ON)
option(AIMRT_USE_LOCAL_PROTOC_COMPILER "GB32960 use local protoc compiler." ON)


# Some necessary settings
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)


include(GetAsio)
include(GetBoost)
include(GetGTest)
include(GetJsonCpp) #
include(GetProtobuf)
include(GetSqlite)
include(GetTBB)
include(GetFmt)
include(Getyalantinglibs)
include(GetYamlCpp)
include(NamespaceTool)
include(ProtobufGenCode)
# Add subdirectories

add_subdirectory(src)
add_subdirectory(test)